Repository navigation
Add Brazilian Portuguese translation - #35
Merged
dannycoulombe merged 2 commits intoNov 12, 2026
Merged
Conversation
Add assets/i18n/pt_BR.json with every English message, and turn the Chinese on/off switch into a Language enum so tr! can choose among several catalogs. Chinese keeps using its other plural form; Brazilian Portuguese uses one for exactly 1, like English. Portuguese system and browser locales (pt, pt-BR, pt-PT) select it on first launch. Co-authored-by: Cursor <cursoragent@cursor.com>
dannycoulombe
marked this pull request as ready for review
November 12, 2026 19:29
Collaborator
|
muito obrigado! |
Contributor
Author
|
I have read and agree to the BenchUp Contributor License Agreement, version 1.0, and I have the authority to grant the licenses described in it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a Brazilian Portuguese (
pt_BR) translation of every application message, and letstr!choose among several catalogs instead of a Chinese on/off switch.assets/i18n/pt_BR.json: all 2,019 keys fromen.json, same named and positional arguments,one/otherplural forms.benchup-core:i18n::Languageenum (English,SimplifiedChinese,BrazilianPortuguese) replaces theCHINESEflag;current_language()is new andis_chinese()is kept.build.rsgenerates onematchper message. Chinese behaves as before (alwaysother); Brazilian Portuguese usesonefor exactly 1, like English.benchup-app: "Brazilian Portuguese" appears in the language picker (appended, so saved preferences keep working). On first launch, Portuguese locales (pt,pt-BR,pt_BR.UTF-8, and alsopt-PT/pt-AO, since this is the only Portuguese catalog) select it.settings.language_brazilian_portugueseinen.json("Brazilian Portuguese") andzh_CN.json("Português (Brasil)").i18n,settings,languageand sidebar preference tests;scripts/test_web_i18n.cjschecks every translated catalog. README notes that new keys need an entry in each translation.The translation was drafted with AI assistance from a shared glossary that follows the Portuguese SketchUp terms Brazilian woodworkers already know (Empurrar/Puxar, Fita métrica, Equidistância, Caixa e espiga, Rabo de andorinha, Tupia…). A script then checked keys, placeholders, their order, plural forms and leading/trailing spaces. I'm a native speaker and reviewed the terminology.
Verification
Run on Ubuntu with Rust 1.97.1 in my fork's Actions:
cargo test --locked -p benchup-core: 308 passed (2 geometry tests skipped, see below).cargo test --locked -p benchup-app --lib --profile ci-test -- language chinese: 11 passed.cargo check --locked -p benchup-app --target wasm32-unknown-unknown: OK.node --test scripts/test_web_i18n.cjs: the Brazilian Portuguese catalog test passes.Already failing on
main(not caused by this PR)cleanup::tests::cleans_mixed_edges_and_multiple_nested_groups_without_touching_other_runsandmeasurement_tests::angular_dimensions_roundtrip_copy_transform_and_undo_without_extra_geometryfail on54ddb06without these changes.scripts/test_web_i18n.cjsfails onmainbecausezh_CN.jsonis missing 104 keys fromen.json.